package com.shioirikukuri.service.impl;

import com.shioirikukuri.entity.CouponType;
import com.shioirikukuri.mapper.CouponTypeMapper;
import com.shioirikukuri.service.ICouponTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CouponTypeServiceImpl implements ICouponTypeService {
	@Autowired
	private CouponTypeMapper couponTypeMapper;

	@Override
	public void createCouponType(CouponType couponType) {
		couponTypeMapper.insertCouponType(couponType);
	}

	@Override
	public CouponType getCouponTypeById(Long id) {
		return couponTypeMapper.selectCouponTypeById(id);
	}

	@Override
	public List<CouponType> getAllCouponTypes() {
		return couponTypeMapper.selectAllCouponTypes();
	}

	@Override
	public void updateCouponType(CouponType couponType) {
		couponTypeMapper.updateCouponType(couponType);
	}

	@Override
	public void deleteCouponTypeById(Long id) {
		couponTypeMapper.deleteCouponTypeById(id);
	}


}